package fr.uniscol.siecle.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Eleve implements Serializable {

	private String id = null;
	
	private String elenoet = null;
	
	private String id_national = null;
	
	private String id_eleve_etab = null;
	
	private String nom = null;
	
	private String prenom = null;
	
	private String date_naissance = null;
	
	private String doublement = null;
	
	private String code_pays = null;
	
	private String accepte_sms = null;
	
	private String date_modification = null;
	
	private String date_sortie = null;
	
	private String Regime = null;
	
	private String date_entree = null;
	
	private String ville_naissance = null;
	
	private MotifSortie motifSortie = null;
	
	private String code_sexe = null;
	
	private String code_pays_nat = null;
	
	private String adhesion_transport = null;
	
	private Provenance provenance = null;
	
	private MEF mef = null;
	
	private ScolariteAnneeDerniere scolariteAnneeDerniere = null;
	
	private List<Option> options = null;
	
	private List<Division> structures = null;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getElenoet() {
		return elenoet;
	}

	public void setElenoet(String elenoet) {
		this.elenoet = elenoet;
	}

	public MEF getMef() {
		return mef;
	}

	public void setMef(MEF mef) {
		this.mef = mef;
	}

	public String getId_national() {
		return id_national;
	}

	public void setId_national(String id_national) {
		this.id_national = id_national;
	}

	public String getId_eleve_etab() {
		return id_eleve_etab;
	}

	public void setId_eleve_etab(String id_eleve_etab) {
		this.id_eleve_etab = id_eleve_etab;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getDate_naissance() {
		return date_naissance;
	}

	public void setDate_naissance(String date_naissance) {
		this.date_naissance = date_naissance;
	}

	public String getDoublement() {
		return doublement;
	}

	public void setDoublement(String doublement) {
		this.doublement = doublement;
	}

	public String getCode_pays() {
		return code_pays;
	}

	public void setCode_pays(String code_pays) {
		this.code_pays = code_pays;
	}

	public String getAccepte_sms() {
		return accepte_sms;
	}

	public void setAccepte_sms(String accepte_sms) {
		this.accepte_sms = accepte_sms;
	}

	public String getDate_modification() {
		return date_modification;
	}

	public void setDate_modification(String date_modification) {
		this.date_modification = date_modification;
	}

	public String getDate_sortie() {
		return date_sortie;
	}

	public void setDate_sortie(String date_sortie) {
		this.date_sortie = date_sortie;
	}

	public String getRegime() {
		return Regime;
	}

	public void setRegime(String regime) {
		Regime = regime;
	}

	public String getDate_entree() {
		return date_entree;
	}

	public void setDate_entree(String date_entree) {
		this.date_entree = date_entree;
	}

	public String getVille_naissance() {
		return ville_naissance;
	}

	public void setVille_naissance(String ville_naissance) {
		this.ville_naissance = ville_naissance;
	}

	public MotifSortie getMotifSortie() {
		return motifSortie;
	}

	public void setMotifSortie(MotifSortie motifSortie) {
		this.motifSortie = motifSortie;
	}

	public String getCode_sexe() {
		return code_sexe;
	}

	public void setCode_sexe(String code_sexe) {
		this.code_sexe = code_sexe;
	}

	public String getCode_pays_nat() {
		return code_pays_nat;
	}

	public void setCode_pays_nat(String code_pays_nat) {
		this.code_pays_nat = code_pays_nat;
	}

	public String getAdhesion_transport() {
		return adhesion_transport;
	}

	public void setAdhesion_transport(String adhesion_transport) {
		this.adhesion_transport = adhesion_transport;
	}

	public Provenance getProvenance() {
		return provenance;
	}

	public void setProvenance(Provenance provenance) {
		this.provenance = provenance;
	}

	public ScolariteAnneeDerniere getScolariteAnneeDerniere() {
		return scolariteAnneeDerniere;
	}

	public void setScolariteAnneeDerniere(
			ScolariteAnneeDerniere scolariteAnneeDerniere) {
		this.scolariteAnneeDerniere = scolariteAnneeDerniere;
	}

	public List<Option> getOptions() {
		if(options == null){
			options = new ArrayList<Option>();
		}
		return options;
	}

	public void setOptions(List<Option> options) {
		this.options = options;
	}

	public List<Division> getStructures() {
		if(structures == null){
			structures = new ArrayList<Division>();
		}
		return structures;
	}
	
	public List<Division> getStructuresByType(String type){
		
		List<Division> str = new ArrayList<Division>();
		
		for(Division d : getStructures()){
			if(type.equalsIgnoreCase("GP") && d instanceof Groupe){
				str.add(d);
			}
		}
		
		return str;
	}

	public void setStructures(List<Division> structures) {
		this.structures = structures;
	}
}
